package com.crm.jpaandthymeleaf.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author 周敬
 * @version 1.0
 * @packageName com.crm.jpaandthymeleaf.config
 * @fileName IndexConfig
 * @createTime 2021/12/16-9:09-星期四
 * @lastModify 2021/12/16-9:09-星期四
 */
@Configuration
public class IndexConfig implements WebMvcConfigurer {

    /**
     * 配置首页
     * @param registry
     */
    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
        registry.addViewController("/").setViewName("forward:/login");
    }
}
